import React from 'react';
import { Modal } from 'antd';
import {ModalForm} from "@ant-design/pro-form";

interface CreateFormProps {
  modalVisible: boolean;
  onCancel: () => void;
}

const CreateForm: React.FC<CreateFormProps> = (props) => {
  const { modalVisible, onCancel } = props;

  return (

    <ModalForm
  destroyOnClose
  title="新建"
  visible={modalVisible}
  onCancel={() => onCancel()}
  footer={null}
>
    {props.children}
  </ModalForm>
  );
};

export default CreateForm;
